import React, { Component } from 'react'
export default class Detail extends Component {

    render() {
        console.log(this.props)
        /*接收params参数*/
        // const { id, title, content } = this.props.match.params
        /*接收search参数*/
        //const { id, title, content } = qs.parse(this.props.location.search.slice(1))
        /*接收state参数*/
        const { id, title, content } = this.props.location.state || {}
        return (
            <ul>
                <li>id:{id}</li>
                <li>title:{title}</li>
                <li>content:{content}</li>
            </ul>
        )
    }
}
